package com.laopan.wxpay.request.query;

import com.laopan.wxpay.exception.WxPayException;
import com.laopan.wxpay.request.RequestCallback;

/**
 * 查询订单
 *
 * @author laopan
 * @className QueryOrder
 * @date 2021/2/26 14:43
 */

public interface QueryOrder<R> {
    /**
     * 查询微信订单
     *
     * @param mchId
     * @param id
     * @return
     * @throws WxPayException
     */
    R query(String mchId, String id) throws WxPayException;

    /**
     * 查询微信订单，通过实现requestCallback自己处理返回数据
     *
     * @param mchId
     * @param id
     * @param requestCallback
     * @return
     * @throws WxPayException
     */
    R query(String mchId, String id, RequestCallback<R> requestCallback) throws WxPayException;
}
